#include "Vector.h"
#include "gtest/gtest.h"

class VectorTest : public ::testing::Test {
public:
	VectorTest(){}
	Vector<int*, 6> v;
	
	virtual void SetUp() {
		v.push_back(new int(1));
		v.push_back(new int(2));
		v.push_back(new int(3));
		v.push_back(new int(4));
		v.push_back(new int(5));
	}
};

TEST_F(VectorTest, sizeTest){
	EXPECT_EQ(v.size(), 5);
}
TEST_F(VectorTest, valueTest){
	EXPECT_EQ(*v[0], 1);
	EXPECT_EQ(*v[1], 2);
	EXPECT_EQ(*v[2], 3);
	EXPECT_EQ(*v[3], 4);
	EXPECT_EQ(*v[4], 5);
}
TEST_F(VectorTest, capacityTest){
	v.push_back(new int(6));
	v.push_back(new int(7));
	EXPECT_EQ(v.size(), 7);
}

TEST_F(VectorTest, removeTest){
	v.remove(2);
	EXPECT_EQ(v.size(), 4);
	EXPECT_EQ(*v[0], 1);
	EXPECT_EQ(*v[1], 2);
	EXPECT_EQ(*v[2], 4);
	EXPECT_EQ(*v[3], 5);
}